{% extends "mentors/base.html" %}
{% block title %}Выбор группы{% endblock title %}
{% block header %}Выберите группу{% endblock header %}
{% block content %}
<form method="post" id="groupForm" action="{% url 'get_group' %}">
    {% csrf_token %}
    <select name="group_number" id="id_group">
        {% for g in group %}
        <option value="{{g}}">{{g}}</option>
        {%endfor%}
    </select>
    <button type="submit" >Показать детей</button>
</form>

<!-- <script>
    function submitForm() {
        document.getElementById("groupForm").action = "{% url 'get_child' 0 %}".replace('0', document.getElementById("id_group").value);
        document.getElementById("groupForm").submit();
    }
</script> onclick="submitForm()" -->

{% endblock content %}
